<?php namespace App\Exceptions\Item;

use App\Exceptions\BaseException;

class OrderException extends BaseException
{
    const NOT_FOUND = 3101;
    const ITEM_INVALID_NOT_PAY = 3110;
    const PAY_MONEY_ERROR = 3111;
    const CREATE_PREPAY_ORDER_FAILURE = 3112;
    const APPEAL_CONTENT_LENGTH = 3150;
    const APPEAL_CONTENT_APPEALED = 3151;
    const MESSAGE_CONTENT_LENGTH_LONG = 3160;
    const MESSAGE_CONTENT_LENGTH = 3161;
    const MESSAGE_CONTENT_APPEALED = 3162;

    const OTHER_PAY_ERROR = 3199;

    protected $messages = [
        self::NOT_FOUND                   => '订单不存在。',
        self::ITEM_INVALID_NOT_PAY        => '消息当前无效，不能购买。',
        self::PAY_MONEY_ERROR             => '付费金额错误。',
        self::CREATE_PREPAY_ORDER_FAILURE => '创建预付订单失败。',

        //申诉
        self::APPEAL_CONTENT_LENGTH       => '申诉内容至少10个字',
        self::APPEAL_CONTENT_APPEALED     => '已发起过申诉，请勿重复发送',

        //留言
        self::MESSAGE_CONTENT_LENGTH_LONG => '留言内容不能超过200字',
        self::MESSAGE_CONTENT_LENGTH      => '留言内容不能不能为空',
        self::MESSAGE_CONTENT_APPEALED    => '已留言，请勿重复操作',

        self::OTHER_PAY_ERROR => '支付错误，请重试。',
    ];
}
